home *** CD-ROM | disk | FTP | other *** search
- // Skinned ghost shader, just a simple additive environment mapping
-
- NSFShader GhostSkinned
- {
- // Packing Definition, wonder if i should change this since we dont use all the info but im afraid a separate
- // vertexbuffer will be allocated for the mesh then
- PackingDef PosBlendWeightBlendIndicesNormUV0
- {
- PD_Stream 0
- PDP_Position 0 PDT_Float3
- PDP_BlendWeights 1 PDT_Float3
- PDP_BlendIndices 2 PDT_UByteColor
- PDP_Normal 3 PDT_Float3
- PDP_Binormal 4 PDT_Float3
- PDP_Tangent 5 PDT_Float3
- PDP_TexCoord0 7 PDT_Float2
- }
-
- // Implementation
- Implementation VS11_PS11
- {
- "This implementation is intended for hardware
- that supports vertex shader version 1.1 and
- pixel shader 1.1."
-
- // Requirements for this implementation
- Requirements
- {
- VSVersion = v1.1
- UserVersion = v0.0
- PSVersion = v1.1
- BinormalTangentMethod = NBTMethod_ATI
- BonesPerPartition = 28
- UsesNIRenderState = true
- Platform = DX8|DX9|XBOX
- }
-
- // Packing Definition it uses
- PackingDef PosBlendWeightBlendIndicesNormUV0
-
- //'Global' render states. Nothing fancy here. We set up Z for
- //safety.
- RenderStates
- {
- AlphaBlendEnable = true
- SrcBlend = one
- DestBlend = SrcAlpha
-
- //SrcBlend = One
- //DestBlend = One
- AlphaTestEnable = false
- CullMode = CW
- ZEnable = ZB_True
- ZWriteEnable = false
- ZFunc = LessEqual
- Lighting = false Save
- }
-
- // First pass
- Pass Pass0
- {
- // Vertexshader
- VSProgram "GhostSkinned"
-
- //Vertex Shader constant map. Mostly commented in the vsh file.
- //For double coverage, we'll state here that we could just use
- //ViewProjTranspose since the SkinWorld part is usually identity,
- //but if our assumption fails then at least positions will be
- //correct on screen. Lighting and the warp effect will be off.
- VS_Constantmap
- {
- CM_Defined SkinWorldViewProjTranspose 0 0
- CM_Constant const_1_1_1_255 4 1 1.0,1.0,1.0,765.01
- CM_Constant Half 5 1 0.5,0.5,0.5,0.5
- CM_Constant Zero 6 1 0.0,0.0,0.0,0.0
- CM_Defined WorldViewTranspose 7 4
- CM_Defined BoneMatrix3 11 0 28
- }
-
- // Texture stage 0
- Stage 0 Stage0
- {
- TSS_Texture = NTM_Base
- }
-
- //Stage 2 GlossMap
- //{
- // TSS_Texture = NTM_Gloss
- //}
-
-
- // Sampler stage 0
- Sampler 0 BaseMapSampler
- {
- TSAMP_AddressU = TADDR_Clamp
- TSAMP_AddressV = TADDR_Clamp
- TSAMP_AddressW = TADDR_Clamp
- TSAMP_MagFilter = TEXF_Linear
- TSAMP_MinFilter = TEXF_Linear
- TSAMP_MipFilter = TEXF_Linear
- }
-
- // Sampler stage 1
- //Sampler 1 GlossMapSampler
- //{
- // TSAMP_AddressU = TADDR_Clamp
- // TSAMP_AddressV = TADDR_Clamp
- // TSAMP_AddressW = TADDR_Clamp
- // TSAMP_MagFilter = TEXF_Linear
- // TSAMP_MinFilter = TEXF_Linear
- // TSAMP_MipFilter = TEXF_Linear
- //}
-
- // Pixelshader
- PSProgram "GhostSkinned"
- }
- }
- }
-
-